package com.dotflat.fin.PO;

import com.dotflat.fin.domain.ProductSolution;
import com.dotflat.rest.PO.AreableObjectBasePO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 *  收费计划
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel
public class ProductSolutionItemPO extends AreableObjectBasePO {

    @ApiModelProperty("产品名字")
    private String productName;

    @ApiModelProperty("产品id")
    private String productId;

    @ApiModelProperty("方案id")
    private String solutionId;

    @ManyToOne
    @JsonIgnore
    @ApiModelProperty(hidden = true)
    private ProductSolution solution;

    @ApiModelProperty("产品详情类型  1：  2： 3：")
    private Integer productDetailType;

    @ApiModelProperty("类型 1:意向（转客户） 2：已购买（签合同）")
    private Integer type;

    @ApiModelProperty("类型值")
    private String typeVal;

    @Column(columnDefinition = "int default 1 COMMENT '类型 1：托班，2:早教，3：其它  4：摄像头  5：订金'")
    private Integer productType = 1;

    @ApiModelProperty("数量")
    private Double count;

    private String unit;

    @ApiModelProperty("实际单位价格")
    private BigDecimal practicalAmount = BigDecimal.ZERO;

    @ApiModelProperty("实际总价格")
    private BigDecimal practicalTotalAmount = BigDecimal.ZERO;

    @ApiModelProperty("标准单位价格")
    private BigDecimal standardAmount=BigDecimal.ZERO;

    @ApiModelProperty("标准总价格")
    private BigDecimal standardTotalAmount=BigDecimal.ZERO;

    @ApiModelProperty("备注")
    private String remark;
}
